home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
049b.dms
/
049b.adf
/
MORE_SOURCE_CODE
/
inertia.AMOS
/
inertia.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-02-26
|
2KB
|
106 lines
'
'INERTIA CONTROL
'BY P.DUNN (HYBRID SOFTWARE)
'FOR F1 P.D
'
'PLEASE NOTE!
'
'I have recently noticed this code bears a striking resemblence
'to another amos game which i have seen,this is purely coincidentle
'
'feel free to do anything with this code and the sprites if their of any use to you
'
'(Oh yeah please excuse my spelling!!)
'
Screen Open 0,320,256,16,Lowres : Curs Off : Flash Off : Cls 0 : Unpack 10 To 0 : Double Buffer
Hide : Get Sprite Palette : Update Off
Close Workbench : Close Editor
Global S,X#,Y#,DX#,DY#
GAMESETUP
'
'
'
'
'
'
'
MAIN:
CHECKDIRECTION
CHECKBOUNDRY
If DX#>4 Then DX#=4
If DY#>4 Then DY#=4
If DX#<-4 Then DX#=-4
If DY#<-4 Then DY#=-4
X#=X#+DX#
Y#=Y#+DY#
If Chanmv(2)=0 Then Bob Off 2
If Fire(1)=-1 and Chanmv(2)=0 Then Bob Off 2 : SHOT
Bob 1,X#,Y#,S
Update
Wait Vbl
Goto MAIN
'
'
'
'
'
'
'
Procedure CHECKDIRECTION
If Jup(1)=-1 Then UP
If Jup(1)=-1 and Jright(1)=-1 Then UPRIGHT : S=8
If Jright(1)=-1 Then RIGHT : S=8
If Jright(1)=-1 and Jdown(1)=-1 Then DWNRIGHT : S=8
If Jdown(1)=-1 Then DWN
If Jdown(1)=-1 and Jleft(1)=-1 Then DWNLEFT : S=7
If Jleft(1)=-1 Then LEFT : S=7
If Jleft(1)=-1 and Jup(1)=-1 Then UPLEFT : S=7
If DX#<0 Then DX#=DX#+0.005
If DX#>0 Then DX#=DX#-0.005
If DY#<0 Then DY#=DY#+0.005
If DY#>0 Then DY#=DY#-0.005
End Proc
Procedure UP
DY#=DY#-0.08
End Proc
Procedure UPRIGHT
DX#=DX#+0.08
DY#=DY#-0.08
End Proc
Procedure RIGHT
DX#=DX#+0.08
End Proc
Procedure DWNRIGHT
DX#=DX#+0.08
DY#=DY#+0.08
End Proc
Procedure DWN
DY#=DY#+0.08
End Proc
Procedure DWNLEFT
DX#=DX#-0.08
DY#=DY#+0.08
End Proc
Procedure LEFT
DX#=DX#-0.08
End Proc
Procedure UPLEFT
DX#=DX#-0.08
DY#=DY#-0.08
End Proc
Procedure CHECKBOUNDRY
If X Bob(1)=<-25 Then Bob 1,324,, : X#=X Bob(1)
If X Bob(1)=>325 Then Bob 1,-24,, : X#=X Bob(1)
If Y Bob(1)=<-25 Then Bob 1,,199, : Y#=Y Bob(1)
If Y Bob(1)=>200 Then Bob 1,,-24, : Y#=Y Bob(1)
End Proc
Procedure GAMESETUP
X#=160 : Y#=100 : DX#=0 : DY#=0 : S=7
Bob 1,X#,Y#,S
End Proc
Procedure SHOT
SHOT$="A:For R1=1 To 20;Let X=X-6;Next R1;"
SHOT1$="A:For R1=1 To 20;Let X=X+6;Next R1;"
If I Bob(1)=7 Then Bob 2,X#-65,Y#+4,9 : Channel 2 To Bob 2 : Amal 2,SHOT$ : Amal On 2
If I Bob(1)=8 Then Bob 2,X#+25,Y#+4,10 : Channel 2 To Bob 2 : Amal 2,SHOT1$ : Amal On 2
End Proc